<template>
  <div class="search-wrap"  :style="{ background: backgroundColor }">
    <van-search v-model="search" placeholder="搜索" />
  </div>
</template>

<script>
import { mapActions, mapGetters, mapMutations } from "vuex";  //vuex得各个方法   mapGetters放在computed里面 之后可以在当前页面用 this.userInfo 使用这个全局变量
export default {
  name: "footerTab",
  props:{
    backgroundColor: {
      type: String,
      default: "rgba(255,255,255,0)",
    },
  },
  data() {
    return{
      search:'',
    
    }
  },
  components: {
  },
  created(){
  
  },
  methods: {
    ...mapMutations({               //set 设置vuex变量得值  也可以用this.$store.commit('setToken','as')  这样设置 setToken需在store/index.js mutations里得定义
      setUserInfo: "setUserInfo",   //设置用户信息
    }),
    submitForm(formName) {
    },
  },
};
</script>

<style lang="scss" scoped>
.search-wrap{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 1.08rem;
  z-index:99;
  ::v-deep{
    .van-search{
      background: transparent;
      height: 100%;
    }
  }
}
</style>